// with polyfills
import 'core-js/stable'
import 'regenerator-runtime/runtime'


import { createApp } from 'vue'
import App from './App.vue'
import 'font-awesome/css/font-awesome.min.css'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'


import i18n from '@/locales'
import store from './store'
import router from './router'


import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'

import dialogDrag from '@/directives/ElementPlusDialogDrag'

import '@ztree/ztree_v3/css/metroStyle/metroStyle.css'

import './global.less' // global style

import './assets/my-button.less'
import './assets/my-ztree.less'

import ElDragableDialog from '@/components/ElDragableDialog'



import jQuery from 'jquery'
(window as any).$ = jQuery ;
(window as any).jQuery = jQuery ;

import DayuPager from '@/components/DayuPager.vue'
import DayuDatePicker from '@/components/DayuDatePicker.vue'
import DayuTimePicker from '@/components/DayuTimePicker.vue'
import DayuDateTimePicker from '@/components/DayuDateTimePicker.vue'
import DayuNumberInput from '@/components/DayuNumberInput.vue'
import DayuIntegerInput from '@/components/DayuIntegerInput.vue'
import DayuDataLock from '@/components/DayuDataLock.vue'
import QueryField from '@/components/QueryField.vue'
//import DayuNormalGrid from '@/components/DayuNormalGrid.vue'
import DayuAuthButton from '@/components/DayuAuthButton.vue'
import DayuDropdown from '@/components/DayuDropdown.vue'
import DayuFormDialog from '@/components/DayuFormDialog.vue'


const app = createApp(App);
app.use(ElementPlus, { locale: zhCn })
app.use(VXETable);
app.use(i18n);
app.use(store);
app.use(router);

app.component('dayu-pager', DayuPager);
app.component('dayu-date-picker', DayuDatePicker);
app.component('dayu-time-picker', DayuTimePicker);
app.component('dayu-date-time-picker', DayuDateTimePicker);
app.component('dayu-number-input', DayuNumberInput);
app.component('dayu-integer-input', DayuIntegerInput);
app.component('dayu-data-lock', DayuDataLock);
app.component('query-field', QueryField);
//app.component('dayu-normal-grid', DayuNormalGrid);
app.component('dayu-auth-button', DayuAuthButton);
app.component('dayu-dropdown', DayuDropdown);
app.component('dayu-form-dialog', DayuFormDialog);

app.component('el-dragable-dialog', ElDragableDialog);

//注册全局指令
app.directive('dialogDrag', dialogDrag);

//全局参数
VXETable.setup({
})

app.mount('#app')